import { observable, computed, action } from 'mobx';
import { Promise } from 'drunk-base';
import { getAdsList, deleteAds, search } from './AdsHttpResource';
import { IAdsModel } from './AdsModel';
import { ListModel } from '../../ListModel';

export class AdsListModel extends ListModel<IAdsModel>  {

    deleteItemImpl(id: string) {
        return deleteAds(id);
    }

    fetchListImpl(page: number, size: number) {
        return getAdsList(page, size);
    }

    searchImpl(name: string, startTime: number, endTime: number, page: number, size: number) {
        return search(name, startTime, endTime, page, size);
    }

}